Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for ska_sun change to position_accurate #201

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Dec 9, 2023

Description

Update test expected values for small roll changes caused by change to default method for position in ska_sun.

Interface impacts

Testing

Unit tests

  • Mac

Functional tests

No functional testing.

@@ -629,7 +630,7 @@ def test_roll_options_for_not_allowed_pitch():
roll = nominal_roll(ra, dec, date)
att0 = Quat([ra, dec, roll])

att = apply_sun_pitch_yaw(att0, pitch=40)
att = apply_sun_pitch_yaw(att0, pitch=40, time=date)
Copy link
Contributor Author

@jeanconn jeanconn Dec 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new ska_sun breaks on the previous line of code here... which I think was wrong anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this change is needed either way... though I think new ska_sun with position_accurate should probably handle the time=None sun_ra=None sun_dec=None case better than an astropy.time ValueError.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a real bug which I have a fix for, PR coming.

@jeanconn jeanconn changed the title Update for ska_sun position_accurate Update tests for ska_sun change to position_accurate Dec 9, 2023
@jeanconn jeanconn marked this pull request as ready for review December 9, 2023 14:18
@taldcroft
Copy link
Member

I would have thought we just use the original fast sun positions via a fast_sun_position_method fixture that gets applied to each failing test. This is useful as a regression test to make sure that all the other coupled changes (chandra_maneuver, chandra_aca etc) don't introduce a change here.

@taldcroft
Copy link
Member

Though it is probably worth having at least one test that uses the default sun position and then the fast method. The final test_get_params() looks like a good candidate to basically duplicate into test_get_params_sun_position_default and test_get_params_sun_position_fast.

@jeanconn
Copy link
Contributor Author

I figured that unless you plan to update the application (sparkles) default to use position_fast (a possibility but one we hadn't discussed) that this was a just one-and-done change to the regress data. And having the changes as diffs in github was useful. If you want to keep the position_fast test data as a different functional test I'm not sure I understand the value of that long term.

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@jeanconn jeanconn merged commit 4d3c31d into master Dec 11, 2023
2 checks passed
@jeanconn jeanconn deleted the roll-update branch December 11, 2023 16:52
@javierggt javierggt mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants